填单页| 百度->商户

应用场景:

用户输入指定油号、加油金额,选择使用的优惠券(或不使用优惠券),接口返回本次加油立减优惠、 优惠券优惠金额及用户实付金额等。注:用户实际支付金额以下单接口为准

1aa49d24f629ff0276a11d432a69af14.png

根据指定油号查询多金额直降优惠

接口请求方式:https, post表单提交

接口测试地址:TP提供

接口线上地址:TP提供

接口入参:

字段名 类型 长度 必填 释义
1 openid string 100 Y 用户唯一标识,百度保证用户粒度唯一性【百度提供】
2 platform string 20 Y 渠道唯一编码【建议TP提供】
3 gas_id string 64 Y 油站唯一ID 【TP提供】
4 oil_no string 64 Y 油号,例如:92、95
5 amount_str string 64 Y 单位元,至少支持传4个金额,英文逗号拼接传输,例如:100,200,300,400
6 coupon_info array 64 N 优惠券唯一ID,没有可以不传,【目前百度侧只支持每次使用一张券】

入参示例:

仅供参考:
{
	"gas_id": "5131588228085193415",
	"platform": 1,
	"openid": "ADKSODOSKKSOOSOFNS",
	"oil_no": "92",
	"amount_str": "100,200,300,400",
	"coupon_info": [{
		"coupon_id": "34404040404040"
	}]
}

响应参数

参数名称 父节点 类型 是否必传 描述
errno int 错误码,0:成功
msg string 结果描述,success:成功
data json 预定结果

出参data结构示例:

仅供参考:
{
	"gas_id": "5131588228085193415",  #油站ID
	"itemList": [{
			"pay_amount": 95.61,   #单位元,优惠后实际支付金额
			"total_amount": 100,   #单位元,优惠前的金额,也就是用户的输入价格
			"service_free": 0.48,  #单位元,立减服务费,没有服务费忽略不传即可
            "coupon_service_free":0.48,#单位元,优惠券服务费,没有服务费忽略不传即可
			"discount_amount": 4.8,#单位元,总直降金额,不含优惠券抵扣金额,不含服务费
            "coupon_amount": 4.8   #单位元,优惠券抵扣金额
			"litre": 12.87,        #单位升,可以购买的升数
            "list_price": 7.25,    #单位元,油单价
			"oil_no": "92"         #油号
		},
        {
			"pay_amount": 191.24,   #单位元,优惠后实际支付金额
			"total_amount": 200,    #单位元,优惠前的金额,也就是用户的输入价格
			"service_free": 0.48,  #单位元,立减服务费,没有服务费忽略不传即可
            "coupon_service_free":0.48,#单位元,优惠券服务费,没有服务费忽略不传即可
			"discount_amount": 8.76,#单位元,总直降金额,不含优惠券抵扣金额,不含服务费
            "coupon_amount": 8.76   #单位元,优惠券抵扣金额
			"litre": 25.74,         #单位升,可以购买的升数
            "list_price": 7.25,     #单位元,油单价
			"oil_no": "92"          #油号
		},
        {
			"pay_amount": 95.61,   #单位元,优惠后实际支付金额
			"total_amount": 300,   #单位元,优惠前的金额,也就是用户的输入价格
			"service_free": 0.48,  #单位元,立减服务费,没有服务费忽略不传即可
            "coupon_service_free":0.48,#单位元,优惠券服务费,没有服务费忽略不传即可
			"discount_amount": 4.8,#单位元,总直降金额,不含优惠券抵扣金额,不含服务费
            "coupon_amount": 4.8   #单位元,优惠券抵扣金额
			"litre": 12.87,        #单位升,可以购买的升数
            "list_price": 7.25,    #单位元,油单价
			"oil_no": "92"         #油号
		},
        {
			"pay_amount": 95.61,   #单位元,优惠后实际支付金额
			"total_amount": 400,   #单位元,优惠前的金额,也就是用户的输入价格
			"service_free": 0.48,  #单位元,立减服务费,没有服务费忽略不传即可
            "coupon_service_free":0.48,#单位元,优惠券服务费,没有服务费忽略不传即可
			"discount_amount": 4.8,#单位元总直降金额,不含优惠券抵扣金额,不含服务费
            "coupon_amount": 4.8   #单位元,优惠券抵扣金额
			"litre": 12.87,        #单位升,可以购买的升数
            "list_price": 7.25,    #单位元,油单价
			"oil_no": "92"         #油号
		}
	]
}
加油基础数据推送常见问题